home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / SHELLS / SZ2 / EDLOAD.PAT < prev    next >
Text File  |  1992-08-31  |  2KB  |  61 lines

  1.    UNIT:  EDITORS.PAS
  2. PROBLEM:  Fatal hang when loading Desktop TEditWindows
  3.    TEST:  Load Desktop file with 2+ TEditWindows, press PgDn = Fatal hang
  4.  
  5. Add the line marked with {!!}
  6. -----------------------------
  7. procedure TFileEditor.InitBuffer ;
  8. begin
  9.    NewBuffer ( Pointer ( Buffer ) ) ;
  10.    BufSize                   := 0 ;             {!!}
  11. end.
  12. -----------------------------
  13. From: Juergen Schlegelmilch <injs%dcztu1.bitnet@utcs.utoronto.ca>
  14.  
  15.  
  16.  
  17. ------------------------------------------------------------
  18. Delete or comment-out these lines; add "CanUndo := TRUE ;"
  19. ------------------------------------------------------------
  20. TEditor.Store:
  21.   { S.Write (CanUndo, SizeOf (Boolean)); }      { !! comment out }
  22.   S.Write (AutoIndent, SizeOf (AutoIndent));    { !! add }
  23. TEditor.Load:
  24.   { S.Read (CanUndo, SizeOf (Boolean)); }       { !! comment out }
  25.   S.Read (AutoIndent, SizeOf (AutoIndent));     { !! add }
  26.   CanUndo                   := TRUE ;           { !! add }
  27.  
  28. ------------------------------------------------------------
  29. NOTES:
  30.  
  31. [X] "BufSize" messes up memory management by BUFFERS unit, when
  32.     TFileEditor is used.  This is because the normal TEditor
  33.     allocates memory directly from the heap, while TFileEditor
  34.     replaces "InitBuffer" via a virtual method.
  35.  
  36. [X] "AutoIndent" should be saved.
  37.  
  38. [X] "CanUndo" is changed for two reasons:
  39.  
  40.     1.  If the ClipBoard is saved to a filename, "TEditor.Load"
  41.         will load the file but with the UNDO disabled.
  42.  
  43.     2.  If your "Desktop Save" routine fails to ignore the
  44.         ClipBoard, the resulting "Untitled" file will have its
  45.         "CanUndo" set to FALSE, resulting in the same problem as
  46.         number (1) above.
  47.  
  48. --------
  49. COMMENTS
  50. --------
  51. Works properly for both TMemo and TFileEditor.  Already
  52. implemented in Al Andersen's NEWEDIT.
  53.  
  54. ///////////////////////////
  55. //  Johnathan J. Stein   //
  56. //  Post Office Box 346  // Comments or suggestions welcomed; please
  57. // Perrysburg, OH  43552 // send to address(es) at left.
  58. //    (419) 666-7103     //
  59. // CompuServe 76576,470  //
  60. ///////////////////////////
  61.